package com.zyit.service.impl;

import com.zyit.mapper.SysUsersMapper;
import com.zyit.model.SysUsers;
import com.zyit.service.SysUsersService;
import jakarta.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class SysUsersServiceImpl implements SysUsersService {
    @Resource
    private SysUsersMapper sysUsersMapper;

    @Override
    public List<SysUsers> findAll() {
        return sysUsersMapper.findAll();
    }

    @Override
    public SysUsers findById(Long id) {
        return sysUsersMapper.findById(id);
    }

    @Override
    public int addUser(SysUsers sysUsers) {
        return sysUsersMapper.addUser(sysUsers);
    }

    @Override
    public List<SysUsers> pageAll(int p, int s ) {
        return sysUsersMapper.pageAll(p,s);
    }

    @Override
    public SysUsers login(SysUsers sysUsers) {
        return sysUsersMapper.login(sysUsers);
    }
}
